<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Flow: flow::net_flow::Congestion_control_classic Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">Flow<span id="projectnumber">&#160;2.0.0</span>
   </div>
   <div id="projectbrief">Flow project: Full implementation reference.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceflow.html">flow</a></li><li class="navelem"><a class="el" href="namespaceflow_1_1net__flow.html">net_flow</a></li><li class="navelem"><a class="el" href="classflow_1_1net__flow_1_1Congestion__control__classic.html">Congestion_control_classic</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="classflow_1_1net__flow_1_1Congestion__control__classic-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">flow::net_flow::Congestion_control_classic Class Reference</div></div>
</div><!--header-->
<div class="contents">

<p>Classic congestion control, based on Reno (TCP RFC 5681), with congestion avoidance, slow start, and congestion window halving (etc.) upon a loss event.  
 <a href="classflow_1_1net__flow_1_1Congestion__control__classic.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="cong__ctl__classic_8hpp_source.html">cong_ctl_classic.hpp</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for flow::net_flow::Congestion_control_classic:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classflow_1_1net__flow_1_1Congestion__control__classic__inherit__graph.svg" width="487" height="203"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for flow::net_flow::Congestion_control_classic:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classflow_1_1net__flow_1_1Congestion__control__classic__coll__graph.svg" width="1450" height="579"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aa4fd5c14f20d7534db287c78387d5f0e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Congestion__control__classic.html#aa4fd5c14f20d7534db287c78387d5f0e">Congestion_control_classic</a> (<a class="el" href="classflow_1_1log_1_1Logger.html">log::Logger</a> *logger_ptr, <a class="el" href="classflow_1_1util_1_1Shared__ptr__alias__holder.html#aef7998db71c60eeb5d1e3d1a97c14886">Peer_socket::Const_ptr</a> sock)</td></tr>
<tr class="memdesc:aa4fd5c14f20d7534db287c78387d5f0e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs object by setting up logging and saving a pointer to the containing <a class="el" href="classflow_1_1net__flow_1_1Peer__socket.html" title="A peer (non-server) socket operating over the Flow network protocol, with optional stream-of-bytes an...">Peer_socket</a>.  <a href="classflow_1_1net__flow_1_1Congestion__control__classic.html#aa4fd5c14f20d7534db287c78387d5f0e">More...</a><br /></td></tr>
<tr class="separator:aa4fd5c14f20d7534db287c78387d5f0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a98ee7d39ccbacacaec6b9e0deff1e6b1"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Congestion__control__classic.html#a98ee7d39ccbacacaec6b9e0deff1e6b1">congestion_window_bytes</a> () const override</td></tr>
<tr class="memdesc:a98ee7d39ccbacacaec6b9e0deff1e6b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Implements <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html#a2b9a554ac60d9fe9d6faf32433c61c86" title="Returns the maximal number of bytes (with respect to m_data field of DATA packets) that this socket s...">Congestion_control_strategy::congestion_window_bytes()</a> API.  <a href="classflow_1_1net__flow_1_1Congestion__control__classic.html#a98ee7d39ccbacacaec6b9e0deff1e6b1">More...</a><br /></td></tr>
<tr class="separator:a98ee7d39ccbacacaec6b9e0deff1e6b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a34b8ef88093f082df7a935bbebfae2f3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Congestion__control__classic.html#a34b8ef88093f082df7a935bbebfae2f3">on_acks</a> (size_t bytes, size_t packets) override</td></tr>
<tr class="memdesc:a34b8ef88093f082df7a935bbebfae2f3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Implements <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html#a832c2c5f72635ef0d5716a9198fd16d4" title="Informs the congestion control strategy that 1 or more previously sent packets whose status was In-fl...">Congestion_control_strategy::on_acks()</a> API.  <a href="classflow_1_1net__flow_1_1Congestion__control__classic.html#a34b8ef88093f082df7a935bbebfae2f3">More...</a><br /></td></tr>
<tr class="separator:a34b8ef88093f082df7a935bbebfae2f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af2340e68dbdbb8d6065ae487b05074be"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Congestion__control__classic.html#af2340e68dbdbb8d6065ae487b05074be">on_loss_event</a> (size_t bytes, size_t packets) override</td></tr>
<tr class="memdesc:af2340e68dbdbb8d6065ae487b05074be"><td class="mdescLeft">&#160;</td><td class="mdescRight">Implements <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html#a238eb8f69e309e354d3fbc1c3017f614" title="Informs the congestion control strategy that 1 or more previously sent packets whose status was In-fl...">Congestion_control_strategy::on_loss_event()</a> API.  <a href="classflow_1_1net__flow_1_1Congestion__control__classic.html#af2340e68dbdbb8d6065ae487b05074be">More...</a><br /></td></tr>
<tr class="separator:af2340e68dbdbb8d6065ae487b05074be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a59148ce4dafea4063b6992b9670909dc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Congestion__control__classic.html#a59148ce4dafea4063b6992b9670909dc">on_drop_timeout</a> (size_t bytes, size_t packets) override</td></tr>
<tr class="memdesc:a59148ce4dafea4063b6992b9670909dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Implements <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html#af7543a12c99ea8d31374b064fdf13d2b" title="Informs the congestion control strategy that 1 or more previously sent packets whose status was In-fl...">Congestion_control_strategy::on_drop_timeout()</a> API.  <a href="classflow_1_1net__flow_1_1Congestion__control__classic.html#a59148ce4dafea4063b6992b9670909dc">More...</a><br /></td></tr>
<tr class="separator:a59148ce4dafea4063b6992b9670909dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a588baa530b660a3437d3a39d68b16404"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Congestion__control__classic.html#a588baa530b660a3437d3a39d68b16404">on_idle_timeout</a> () override</td></tr>
<tr class="memdesc:a588baa530b660a3437d3a39d68b16404"><td class="mdescLeft">&#160;</td><td class="mdescRight">Implements <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html#a6cecbb76a9e837824c0b820e7cc1b3b7" title="Informs the congestion control strategy that Node considers the connection to be &quot;idle&quot; by virtue of ...">Congestion_control_strategy::on_idle_timeout()</a> API.  <a href="classflow_1_1net__flow_1_1Congestion__control__classic.html#a588baa530b660a3437d3a39d68b16404">More...</a><br /></td></tr>
<tr class="separator:a588baa530b660a3437d3a39d68b16404"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classflow_1_1net__flow_1_1Congestion__control__strategy"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classflow_1_1net__flow_1_1Congestion__control__strategy')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html">flow::net_flow::Congestion_control_strategy</a></td></tr>
<tr class="memitem:a2b9a554ac60d9fe9d6faf32433c61c86 inherit pub_methods_classflow_1_1net__flow_1_1Congestion__control__strategy"><td class="memItemLeft" align="right" valign="top">virtual size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html#a2b9a554ac60d9fe9d6faf32433c61c86">congestion_window_bytes</a> () const =0</td></tr>
<tr class="memdesc:a2b9a554ac60d9fe9d6faf32433c61c86 inherit pub_methods_classflow_1_1net__flow_1_1Congestion__control__strategy"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the maximal number of bytes (with respect to <code>m_data</code> field of DATA packets) that this socket should allow to be In-flight at this time.  <a href="classflow_1_1net__flow_1_1Congestion__control__strategy.html#a2b9a554ac60d9fe9d6faf32433c61c86">More...</a><br /></td></tr>
<tr class="separator:a2b9a554ac60d9fe9d6faf32433c61c86 inherit pub_methods_classflow_1_1net__flow_1_1Congestion__control__strategy"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a832c2c5f72635ef0d5716a9198fd16d4 inherit pub_methods_classflow_1_1net__flow_1_1Congestion__control__strategy"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html#a832c2c5f72635ef0d5716a9198fd16d4">on_acks</a> (size_t bytes, size_t packets)</td></tr>
<tr class="memdesc:a832c2c5f72635ef0d5716a9198fd16d4 inherit pub_methods_classflow_1_1net__flow_1_1Congestion__control__strategy"><td class="mdescLeft">&#160;</td><td class="mdescRight">Informs the congestion control strategy that 1 or more previously sent packets whose status was In-flight just received acknowledgments, thus changing their state from In-flight to Acknowledged.  <a href="classflow_1_1net__flow_1_1Congestion__control__strategy.html#a832c2c5f72635ef0d5716a9198fd16d4">More...</a><br /></td></tr>
<tr class="separator:a832c2c5f72635ef0d5716a9198fd16d4 inherit pub_methods_classflow_1_1net__flow_1_1Congestion__control__strategy"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a238eb8f69e309e354d3fbc1c3017f614 inherit pub_methods_classflow_1_1net__flow_1_1Congestion__control__strategy"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html#a238eb8f69e309e354d3fbc1c3017f614">on_loss_event</a> (size_t bytes, size_t packets)</td></tr>
<tr class="memdesc:a238eb8f69e309e354d3fbc1c3017f614 inherit pub_methods_classflow_1_1net__flow_1_1Congestion__control__strategy"><td class="mdescLeft">&#160;</td><td class="mdescRight">Informs the congestion control strategy that 1 or more previously sent packets whose status was In-flight have just been inferred to be Dropped by receiving acknowledgments of packets that were sent later than the now-Dropped packets.  <a href="classflow_1_1net__flow_1_1Congestion__control__strategy.html#a238eb8f69e309e354d3fbc1c3017f614">More...</a><br /></td></tr>
<tr class="separator:a238eb8f69e309e354d3fbc1c3017f614 inherit pub_methods_classflow_1_1net__flow_1_1Congestion__control__strategy"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab5a942e2097cbad4ec8ea152d40ed88a inherit pub_methods_classflow_1_1net__flow_1_1Congestion__control__strategy"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html#ab5a942e2097cbad4ec8ea152d40ed88a">on_individual_ack</a> (const <a class="el" href="namespaceflow.html#a48799f1263cdeedec125be51a3db2b79">Fine_duration</a> &amp;packet_rtt, const size_t bytes, const size_t sent_cwnd_bytes)</td></tr>
<tr class="memdesc:ab5a942e2097cbad4ec8ea152d40ed88a inherit pub_methods_classflow_1_1net__flow_1_1Congestion__control__strategy"><td class="mdescLeft">&#160;</td><td class="mdescRight">Informs the congestion control strategy that exactly 1 previously sent packet whose status was In-flight is now known to have the given round trip time (RTT), via acknowledgment.  <a href="classflow_1_1net__flow_1_1Congestion__control__strategy.html#ab5a942e2097cbad4ec8ea152d40ed88a">More...</a><br /></td></tr>
<tr class="separator:ab5a942e2097cbad4ec8ea152d40ed88a inherit pub_methods_classflow_1_1net__flow_1_1Congestion__control__strategy"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af7543a12c99ea8d31374b064fdf13d2b inherit pub_methods_classflow_1_1net__flow_1_1Congestion__control__strategy"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html#af7543a12c99ea8d31374b064fdf13d2b">on_drop_timeout</a> (size_t bytes, size_t packets)</td></tr>
<tr class="memdesc:af7543a12c99ea8d31374b064fdf13d2b inherit pub_methods_classflow_1_1net__flow_1_1Congestion__control__strategy"><td class="mdescLeft">&#160;</td><td class="mdescRight">Informs the congestion control strategy that 1 or more previously sent packets whose status was In-flight have just been inferred to be Dropped because of the Drop Timer expiring.  <a href="classflow_1_1net__flow_1_1Congestion__control__strategy.html#af7543a12c99ea8d31374b064fdf13d2b">More...</a><br /></td></tr>
<tr class="separator:af7543a12c99ea8d31374b064fdf13d2b inherit pub_methods_classflow_1_1net__flow_1_1Congestion__control__strategy"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6cecbb76a9e837824c0b820e7cc1b3b7 inherit pub_methods_classflow_1_1net__flow_1_1Congestion__control__strategy"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html#a6cecbb76a9e837824c0b820e7cc1b3b7">on_idle_timeout</a> ()</td></tr>
<tr class="memdesc:a6cecbb76a9e837824c0b820e7cc1b3b7 inherit pub_methods_classflow_1_1net__flow_1_1Congestion__control__strategy"><td class="mdescLeft">&#160;</td><td class="mdescRight">Informs the congestion control strategy that <a class="el" href="classflow_1_1net__flow_1_1Node.html" title="An object of this class is a single Flow-protocol networking node, in the sense that: (1) it has a di...">Node</a> considers the connection to be "idle" by virtue of no desired send activity on the part of the user application for some period of time.  <a href="classflow_1_1net__flow_1_1Congestion__control__strategy.html#a6cecbb76a9e837824c0b820e7cc1b3b7">More...</a><br /></td></tr>
<tr class="separator:a6cecbb76a9e837824c0b820e7cc1b3b7 inherit pub_methods_classflow_1_1net__flow_1_1Congestion__control__strategy"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classflow_1_1util_1_1Null__interface"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classflow_1_1util_1_1Null__interface')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classflow_1_1util_1_1Null__interface.html">flow::util::Null_interface</a></td></tr>
<tr class="memitem:a5916282577627e424a09884347eddbba inherit pub_methods_classflow_1_1util_1_1Null__interface"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1util_1_1Null__interface.html#a5916282577627e424a09884347eddbba">~Null_interface</a> ()=0</td></tr>
<tr class="memdesc:a5916282577627e424a09884347eddbba inherit pub_methods_classflow_1_1util_1_1Null__interface"><td class="mdescLeft">&#160;</td><td class="mdescRight">Boring <code>virtual</code> destructor.  <a href="classflow_1_1util_1_1Null__interface.html#a5916282577627e424a09884347eddbba">More...</a><br /></td></tr>
<tr class="separator:a5916282577627e424a09884347eddbba inherit pub_methods_classflow_1_1util_1_1Null__interface"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classflow_1_1log_1_1Log__context"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classflow_1_1log_1_1Log__context')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classflow_1_1log_1_1Log__context.html">flow::log::Log_context</a></td></tr>
<tr class="memitem:ae7100d2dd130d8f130e3e64fdb1f4fd9 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1log_1_1Log__context.html#ae7100d2dd130d8f130e3e64fdb1f4fd9">Log_context</a> (<a class="el" href="classflow_1_1log_1_1Logger.html">Logger</a> *logger=0)</td></tr>
<tr class="memdesc:ae7100d2dd130d8f130e3e64fdb1f4fd9 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs <a class="el" href="classflow_1_1log_1_1Log__context.html" title="Convenience class that simply stores a Logger and/or Component passed into a constructor; and returns...">Log_context</a> by storing the given pointer to a <a class="el" href="classflow_1_1log_1_1Logger.html" title="Interface that the user should implement, passing the implementing Logger into logging classes (Flow&#39;...">Logger</a> and a null <a class="el" href="classflow_1_1log_1_1Component.html" title="A light-weight class, each object storing a component payload encoding an enum value from enum type o...">Component</a>.  <a href="classflow_1_1log_1_1Log__context.html#ae7100d2dd130d8f130e3e64fdb1f4fd9">More...</a><br /></td></tr>
<tr class="separator:ae7100d2dd130d8f130e3e64fdb1f4fd9 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af1ac7f30ab442c3c6aa6079335df6c9a inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memTemplParams" colspan="2">template&lt;typename Component_payload &gt; </td></tr>
<tr class="memitem:af1ac7f30ab442c3c6aa6079335df6c9a inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classflow_1_1log_1_1Log__context.html#af1ac7f30ab442c3c6aa6079335df6c9a">Log_context</a> (<a class="el" href="classflow_1_1log_1_1Logger.html">Logger</a> *logger, Component_payload component_payload)</td></tr>
<tr class="memdesc:af1ac7f30ab442c3c6aa6079335df6c9a inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs <a class="el" href="classflow_1_1log_1_1Log__context.html" title="Convenience class that simply stores a Logger and/or Component passed into a constructor; and returns...">Log_context</a> by storing the given pointer to a <a class="el" href="classflow_1_1log_1_1Logger.html" title="Interface that the user should implement, passing the implementing Logger into logging classes (Flow&#39;...">Logger</a> and a new <a class="el" href="classflow_1_1log_1_1Component.html" title="A light-weight class, each object storing a component payload encoding an enum value from enum type o...">Component</a> storing the specified generically typed payload (an <code>enum</code> value).  <a href="classflow_1_1log_1_1Log__context.html#af1ac7f30ab442c3c6aa6079335df6c9a">More...</a><br /></td></tr>
<tr class="separator:af1ac7f30ab442c3c6aa6079335df6c9a inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c57a7f44959a01ca9a1c948a6686cc0 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1log_1_1Log__context.html#a5c57a7f44959a01ca9a1c948a6686cc0">Log_context</a> (const <a class="el" href="classflow_1_1log_1_1Log__context.html">Log_context</a> &amp;src)</td></tr>
<tr class="memdesc:a5c57a7f44959a01ca9a1c948a6686cc0 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy constructor that stores equal <code>Logger*</code> and <a class="el" href="classflow_1_1log_1_1Component.html" title="A light-weight class, each object storing a component payload encoding an enum value from enum type o...">Component</a> values as the source.  <a href="classflow_1_1log_1_1Log__context.html#a5c57a7f44959a01ca9a1c948a6686cc0">More...</a><br /></td></tr>
<tr class="separator:a5c57a7f44959a01ca9a1c948a6686cc0 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3d4e624833d96bdafa1485ffff472509 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1log_1_1Log__context.html#a3d4e624833d96bdafa1485ffff472509">Log_context</a> (<a class="el" href="classflow_1_1log_1_1Log__context.html">Log_context</a> &amp;&amp;src)</td></tr>
<tr class="memdesc:a3d4e624833d96bdafa1485ffff472509 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="mdescLeft">&#160;</td><td class="mdescRight">Move constructor that makes this equal to <code>src</code>, while the latter becomes as-if default-constructed.  <a href="classflow_1_1log_1_1Log__context.html#a3d4e624833d96bdafa1485ffff472509">More...</a><br /></td></tr>
<tr class="separator:a3d4e624833d96bdafa1485ffff472509 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d628315d5a93908d47a281980d3113e inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classflow_1_1log_1_1Log__context.html">Log_context</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1log_1_1Log__context.html#a5d628315d5a93908d47a281980d3113e">operator=</a> (const <a class="el" href="classflow_1_1log_1_1Log__context.html">Log_context</a> &amp;src)</td></tr>
<tr class="memdesc:a5d628315d5a93908d47a281980d3113e inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="mdescLeft">&#160;</td><td class="mdescRight">Assignment operator that behaves similarly to the copy constructor.  <a href="classflow_1_1log_1_1Log__context.html#a5d628315d5a93908d47a281980d3113e">More...</a><br /></td></tr>
<tr class="separator:a5d628315d5a93908d47a281980d3113e inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aae857197aecba8606c32296bc7bec308 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classflow_1_1log_1_1Log__context.html">Log_context</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1log_1_1Log__context.html#aae857197aecba8606c32296bc7bec308">operator=</a> (<a class="el" href="classflow_1_1log_1_1Log__context.html">Log_context</a> &amp;&amp;src)</td></tr>
<tr class="memdesc:aae857197aecba8606c32296bc7bec308 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="mdescLeft">&#160;</td><td class="mdescRight">Move assignment operator that behaves similarly to the move constructor.  <a href="classflow_1_1log_1_1Log__context.html#aae857197aecba8606c32296bc7bec308">More...</a><br /></td></tr>
<tr class="separator:aae857197aecba8606c32296bc7bec308 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa6bb8e4250586425631ef80063caf155 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1log_1_1Log__context.html#aa6bb8e4250586425631ef80063caf155">swap</a> (<a class="el" href="classflow_1_1log_1_1Log__context.html">Log_context</a> &amp;other)</td></tr>
<tr class="memdesc:aa6bb8e4250586425631ef80063caf155 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="mdescLeft">&#160;</td><td class="mdescRight">Swaps <a class="el" href="classflow_1_1log_1_1Logger.html" title="Interface that the user should implement, passing the implementing Logger into logging classes (Flow&#39;...">Logger</a> pointers and <a class="el" href="classflow_1_1log_1_1Component.html" title="A light-weight class, each object storing a component payload encoding an enum value from enum type o...">Component</a> objects held by <code>*this</code> and <code>other</code>.  <a href="classflow_1_1log_1_1Log__context.html#aa6bb8e4250586425631ef80063caf155">More...</a><br /></td></tr>
<tr class="separator:aa6bb8e4250586425631ef80063caf155 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af4db395042b065b00398cd59845dcb4d inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classflow_1_1log_1_1Logger.html">Logger</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1log_1_1Log__context.html#af4db395042b065b00398cd59845dcb4d">get_logger</a> () const</td></tr>
<tr class="memdesc:af4db395042b065b00398cd59845dcb4d inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the stored <a class="el" href="classflow_1_1log_1_1Logger.html" title="Interface that the user should implement, passing the implementing Logger into logging classes (Flow&#39;...">Logger</a> pointer, particularly as many <code>FLOW_LOG_*()</code> macros expect.  <a href="classflow_1_1log_1_1Log__context.html#af4db395042b065b00398cd59845dcb4d">More...</a><br /></td></tr>
<tr class="separator:af4db395042b065b00398cd59845dcb4d inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8a5fef42dc2cedf3c0d1a6e83beb2948 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classflow_1_1log_1_1Component.html">Component</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1log_1_1Log__context.html#a8a5fef42dc2cedf3c0d1a6e83beb2948">get_log_component</a> () const</td></tr>
<tr class="memdesc:a8a5fef42dc2cedf3c0d1a6e83beb2948 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns reference to the stored <a class="el" href="classflow_1_1log_1_1Component.html" title="A light-weight class, each object storing a component payload encoding an enum value from enum type o...">Component</a> object, particularly as many <code>FLOW_LOG_*()</code> macros expect.  <a href="classflow_1_1log_1_1Log__context.html#a8a5fef42dc2cedf3c0d1a6e83beb2948">More...</a><br /></td></tr>
<tr class="separator:a8a5fef42dc2cedf3c0d1a6e83beb2948 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-methods" name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr class="memitem:a6267f980c8a0f33f8213e1fa4b83ee16"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Congestion__control__classic.html#a6267f980c8a0f33f8213e1fa4b83ee16">congestion_window_decay</a> () const</td></tr>
<tr class="memdesc:a6267f980c8a0f33f8213e1fa4b83ee16"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the decay (as a percentage) to apply to the congestion window upon encounterling loss.  <a href="classflow_1_1net__flow_1_1Congestion__control__classic.html#a6267f980c8a0f33f8213e1fa4b83ee16">More...</a><br /></td></tr>
<tr class="separator:a6267f980c8a0f33f8213e1fa4b83ee16"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-attribs" name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:a03a5671f57a7a8f7b0cdce200d29bd3b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classflow_1_1net__flow_1_1Congestion__control__classic__data.html">Congestion_control_classic_data</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Congestion__control__classic.html#a03a5671f57a7a8f7b0cdce200d29bd3b">m_classic_data</a></td></tr>
<tr class="memdesc:a03a5671f57a7a8f7b0cdce200d29bd3b"><td class="mdescLeft">&#160;</td><td class="mdescRight">The Reno CWND/SSTHRESH-changing engine and CWND/SSTHRESH storage.  <a href="classflow_1_1net__flow_1_1Congestion__control__classic.html#a03a5671f57a7a8f7b0cdce200d29bd3b">More...</a><br /></td></tr>
<tr class="separator:a03a5671f57a7a8f7b0cdce200d29bd3b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="inherited" name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pro_methods_classflow_1_1net__flow_1_1Congestion__control__strategy"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_classflow_1_1net__flow_1_1Congestion__control__strategy')"><img src="closed.png" alt="-"/>&#160;Protected Member Functions inherited from <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html">flow::net_flow::Congestion_control_strategy</a></td></tr>
<tr class="memitem:a0eacd984fd4e7d5ad3c30a59082ac95b inherit pro_methods_classflow_1_1net__flow_1_1Congestion__control__strategy"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html#a0eacd984fd4e7d5ad3c30a59082ac95b">Congestion_control_strategy</a> (<a class="el" href="classflow_1_1log_1_1Logger.html">log::Logger</a> *logger_ptr, <a class="el" href="classflow_1_1util_1_1Shared__ptr__alias__holder.html#aef7998db71c60eeb5d1e3d1a97c14886">Peer_socket::Const_ptr</a> sock)</td></tr>
<tr class="memdesc:a0eacd984fd4e7d5ad3c30a59082ac95b inherit pro_methods_classflow_1_1net__flow_1_1Congestion__control__strategy"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs object by setting up logging and saving a pointer to the containing <a class="el" href="classflow_1_1net__flow_1_1Peer__socket.html" title="A peer (non-server) socket operating over the Flow network protocol, with optional stream-of-bytes an...">Peer_socket</a>.  <a href="classflow_1_1net__flow_1_1Congestion__control__strategy.html#a0eacd984fd4e7d5ad3c30a59082ac95b">More...</a><br /></td></tr>
<tr class="separator:a0eacd984fd4e7d5ad3c30a59082ac95b inherit pro_methods_classflow_1_1net__flow_1_1Congestion__control__strategy"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3e9786f9e5f170ca23135a2a815bc3f4 inherit pro_methods_classflow_1_1net__flow_1_1Congestion__control__strategy"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classflow_1_1util_1_1Shared__ptr__alias__holder.html#aef7998db71c60eeb5d1e3d1a97c14886">Peer_socket::Const_ptr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html#a3e9786f9e5f170ca23135a2a815bc3f4">socket</a> () const</td></tr>
<tr class="memdesc:a3e9786f9e5f170ca23135a2a815bc3f4 inherit pro_methods_classflow_1_1net__flow_1_1Congestion__control__strategy"><td class="mdescLeft">&#160;</td><td class="mdescRight">Utility for subclasses that returns a handle to the containing <a class="el" href="classflow_1_1net__flow_1_1Peer__socket.html" title="A peer (non-server) socket operating over the Flow network protocol, with optional stream-of-bytes an...">Peer_socket</a>.  <a href="classflow_1_1net__flow_1_1Congestion__control__strategy.html#a3e9786f9e5f170ca23135a2a815bc3f4">More...</a><br /></td></tr>
<tr class="separator:a3e9786f9e5f170ca23135a2a815bc3f4 inherit pro_methods_classflow_1_1net__flow_1_1Congestion__control__strategy"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >Classic congestion control, based on Reno (TCP RFC 5681), with congestion avoidance, slow start, and congestion window halving (etc.) upon a loss event. </p>
<p >Implements <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html" title="The abstract interface for a per-socket module that determines the socket&#39;s congestion control behavi...">Congestion_control_strategy</a> abstract API.</p>
<p >The basic idea is: start with a narrow pipe. With each acknowledgment, grow the width of the pipe exponentially (a/k/a "slow start"). Eventually this will either hit the maximum width or cause loss. Once loss is detected, guess that the "steady-state" pipe width is about half of that at the point where loss occurred, set the pipe to that width and increase the pipe width but slowly (linearly) as acknowledgments arrive (a/k/a "congestion avoidance"). Eventually this will cause loss again: again guess pipe is half that width and start at that width and increase linearly (congestion avoidance again). Continue indefinitely. This results in the characteristic CWND vs. time graph, where CWND first explodes up, then goes up diagonally and vertically down, up, down, up, down, like a saw edge.</p>
<p >Additionally, on major loss (Drop Timeout), guess the steady state pipe width as above but reset the actual pipe width to its narrowest value. This will cause exponential growth again until the steady state pipe width is reached, then linear growth.</p>
<p >On idle timeout (when connection is seen as idle in the send direction), reset the pipe to its original narrow width but make no change to the steady-state pipe width.</p>
<p >The strength of this algorithm is that it's time-tested and saved the Internet from collapsing. The weakness is that once it encounters loss &ndash; which may well be random loss and not a sign of congestion &ndash; it backs off very conservatively (half). This means in a somewhat lossy environment one flow like this will fail to take advantage of the available bandwidth.</p>
<dl class="section note"><dt>Note</dt><dd>The above refers to "half" the pipe width being used when backing off due to loss, as in classic Reno, but actually we make it configurable through socket options.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classflow_1_1net__flow_1_1Congestion__control__classic__with__bandwidth__est.html" title="Classic congestion control but with backoff to bandwidth estimate-based pipe size.">Congestion_control_classic_with_bandwidth_est</a> that acts similarly but instead of backing off conservatively to half (etc.) the pipe, backs off to an estimate as to the available pipe width based on a bandwidth estimator. </dd></dl>

<p class="definition">Definition at line <a class="el" href="cong__ctl__classic_8hpp_source.html#l00063">63</a> of file <a class="el" href="cong__ctl__classic_8hpp_source.html">cong_ctl_classic.hpp</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="aa4fd5c14f20d7534db287c78387d5f0e" name="aa4fd5c14f20d7534db287c78387d5f0e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa4fd5c14f20d7534db287c78387d5f0e">&#9670;&nbsp;</a></span>Congestion_control_classic()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">flow::net_flow::Congestion_control_classic::Congestion_control_classic </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classflow_1_1log_1_1Logger.html">log::Logger</a> *&#160;</td>
          <td class="paramname"><em>logger_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classflow_1_1util_1_1Shared__ptr__alias__holder.html#aef7998db71c60eeb5d1e3d1a97c14886">Peer_socket::Const_ptr</a>&#160;</td>
          <td class="paramname"><em>sock</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Constructs object by setting up logging and saving a pointer to the containing <a class="el" href="classflow_1_1net__flow_1_1Peer__socket.html" title="A peer (non-server) socket operating over the Flow network protocol, with optional stream-of-bytes an...">Peer_socket</a>. </p>
<p >Congestion window is chosen to be some small initial value, and an exponential congestion window growth is set up to continue indefinitely, until a loss event, drop timeout, or idle timeout.</p>
<p >Only a weak pointer of <code>sock</code> is stored: the <code>shared_ptr</code> itself is not saved, so the reference count of <code>sock</code> does not increase. This avoids a circular <code>shared_ptr</code> situation that would arise from <code>*this</code> pointing to <code>sock</code>, and <code>sock</code> pointing to <code>*this</code> (the two objects <em>do</em> need access to each other, as explained in class <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html" title="The abstract interface for a per-socket module that determines the socket&#39;s congestion control behavi...">Congestion_control_strategy</a> doc header).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">logger_ptr</td><td>The Logger implementation to use subsequently. </td></tr>
    <tr><td class="paramname">sock</td><td>The <a class="el" href="classflow_1_1net__flow_1_1Peer__socket.html" title="A peer (non-server) socket operating over the Flow network protocol, with optional stream-of-bytes an...">Peer_socket</a> for which this module will control congestion policy. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="cong__ctl__classic_8cpp_source.html#l00025">25</a> of file <a class="el" href="cong__ctl__classic_8cpp_source.html">cong_ctl_classic.cpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a98ee7d39ccbacacaec6b9e0deff1e6b1" name="a98ee7d39ccbacacaec6b9e0deff1e6b1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a98ee7d39ccbacacaec6b9e0deff1e6b1">&#9670;&nbsp;</a></span>congestion_window_bytes()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">size_t flow::net_flow::Congestion_control_classic::congestion_window_bytes </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Implements <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html#a2b9a554ac60d9fe9d6faf32433c61c86" title="Returns the maximal number of bytes (with respect to m_data field of DATA packets) that this socket s...">Congestion_control_strategy::congestion_window_bytes()</a> API. </p>
<dl class="section return"><dt>Returns</dt><dd>See <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html#a2b9a554ac60d9fe9d6faf32433c61c86" title="Returns the maximal number of bytes (with respect to m_data field of DATA packets) that this socket s...">Congestion_control_strategy::congestion_window_bytes()</a>. </dd></dl>

<p>Implements <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html#a2b9a554ac60d9fe9d6faf32433c61c86">flow::net_flow::Congestion_control_strategy</a>.</p>

<p class="definition">Definition at line <a class="el" href="cong__ctl__classic_8cpp_source.html#l00033">33</a> of file <a class="el" href="cong__ctl__classic_8cpp_source.html">cong_ctl_classic.cpp</a>.</p>

<p class="reference">References <a class="el" href="cong__ctl__util_8cpp_source.html#l00061">flow::net_flow::Congestion_control_classic_data::congestion_window_bytes()</a>, and <a class="el" href="cong__ctl__classic_8hpp_source.html#l00165">m_classic_data</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classflow_1_1net__flow_1_1Congestion__control__classic_a98ee7d39ccbacacaec6b9e0deff1e6b1_cgraph.svg" width="442" height="59"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>

</div>
</div>
<a id="a6267f980c8a0f33f8213e1fa4b83ee16" name="a6267f980c8a0f33f8213e1fa4b83ee16"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6267f980c8a0f33f8213e1fa4b83ee16">&#9670;&nbsp;</a></span>congestion_window_decay()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int flow::net_flow::Congestion_control_classic::congestion_window_decay </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the decay (as a percentage) to apply to the congestion window upon encounterling loss. </p>
<p >RFC 5681-3.2.1 and formula (4) say this should 50 (i.e., halve it); but we make it configurable by a socket option.</p>
<dl class="section return"><dt>Returns</dt><dd>A percentage in the range [1, 100]. </dd></dl>

<p class="definition">Definition at line <a class="el" href="cong__ctl__classic_8cpp_source.html#l00164">164</a> of file <a class="el" href="cong__ctl__classic_8cpp_source.html">cong_ctl_classic.cpp</a>.</p>

<p class="reference">References <a class="el" href="cong__ctl_8cpp_source.html#l00063">flow::net_flow::Congestion_control_strategy::socket()</a>.</p>

<p class="reference">Referenced by <a class="el" href="cong__ctl__classic_8cpp_source.html#l00126">on_drop_timeout()</a>, and <a class="el" href="cong__ctl__classic_8cpp_source.html#l00046">on_loss_event()</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classflow_1_1net__flow_1_1Congestion__control__classic_a6267f980c8a0f33f8213e1fa4b83ee16_cgraph.svg" width="402" height="59"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classflow_1_1net__flow_1_1Congestion__control__classic_a6267f980c8a0f33f8213e1fa4b83ee16_icgraph.svg" width="427" height="120"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>

</div>
</div>
<a id="a34b8ef88093f082df7a935bbebfae2f3" name="a34b8ef88093f082df7a935bbebfae2f3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a34b8ef88093f082df7a935bbebfae2f3">&#9670;&nbsp;</a></span>on_acks()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void flow::net_flow::Congestion_control_classic::on_acks </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>packets</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Implements <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html#a832c2c5f72635ef0d5716a9198fd16d4" title="Informs the congestion control strategy that 1 or more previously sent packets whose status was In-fl...">Congestion_control_strategy::on_acks()</a> API. </p>
<p >Congestion window grows either linearly (in congestion avoidance mode) or exponentially (in slow start mode). There is no congestion avoidance mode until at least one of <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__classic.html#af2340e68dbdbb8d6065ae487b05074be" title="Implements Congestion_control_strategy::on_loss_event() API.">on_loss_event()</a> or <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__classic.html#a59148ce4dafea4063b6992b9670909dc" title="Implements Congestion_control_strategy::on_drop_timeout() API.">on_drop_timeout()</a> occurs; at least until then slow start is in effect.</p>
<p >Additional <a class="el" href="classflow_1_1net__flow_1_1Peer__socket.html" title="A peer (non-server) socket operating over the Flow network protocol, with optional stream-of-bytes an...">Peer_socket</a> state used: none.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">bytes</td><td>See <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html#a832c2c5f72635ef0d5716a9198fd16d4" title="Informs the congestion control strategy that 1 or more previously sent packets whose status was In-fl...">Congestion_control_strategy::on_acks()</a>. </td></tr>
    <tr><td class="paramname">packets</td><td>See <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html#a832c2c5f72635ef0d5716a9198fd16d4" title="Informs the congestion control strategy that 1 or more previously sent packets whose status was In-fl...">Congestion_control_strategy::on_acks()</a>. </td></tr>
  </table>
  </dd>
</dl>

<p>Reimplemented from <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html#a832c2c5f72635ef0d5716a9198fd16d4">flow::net_flow::Congestion_control_strategy</a>.</p>

<p class="definition">Definition at line <a class="el" href="cong__ctl__classic_8cpp_source.html#l00038">38</a> of file <a class="el" href="cong__ctl__classic_8cpp_source.html">cong_ctl_classic.cpp</a>.</p>

<p class="reference">References <a class="el" href="cong__ctl__classic_8hpp_source.html#l00165">m_classic_data</a>, and <a class="el" href="cong__ctl__util_8cpp_source.html#l00076">flow::net_flow::Congestion_control_classic_data::on_acks()</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classflow_1_1net__flow_1_1Congestion__control__classic_a34b8ef88093f082df7a935bbebfae2f3_cgraph.svg" width="899" height="272"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>

</div>
</div>
<a id="a59148ce4dafea4063b6992b9670909dc" name="a59148ce4dafea4063b6992b9670909dc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a59148ce4dafea4063b6992b9670909dc">&#9670;&nbsp;</a></span>on_drop_timeout()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void flow::net_flow::Congestion_control_classic::on_drop_timeout </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>packets</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Implements <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html#af7543a12c99ea8d31374b064fdf13d2b" title="Informs the congestion control strategy that 1 or more previously sent packets whose status was In-fl...">Congestion_control_strategy::on_drop_timeout()</a> API. </p>
<p >Congestion window is set to a low value, while the next slow start session is set to end at roughly half (or some configurable constant fraction) of the current (pre-decrease) congestion window. Thus a slow start session begins.</p>
<p >Additional <a class="el" href="classflow_1_1net__flow_1_1Peer__socket.html" title="A peer (non-server) socket operating over the Flow network protocol, with optional stream-of-bytes an...">Peer_socket</a> state used: <a class="el" href="classflow_1_1net__flow_1_1Peer__socket.html#ae870847f024fca7109c15557bb165480" title="The number of bytes contained in all In-flight packets, used at least for comparison against the cong...">Peer_socket::m_snd_flying_bytes</a> (the # of bytes still In-flight after the loss event implied by the timeout).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">bytes</td><td>See <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html#af7543a12c99ea8d31374b064fdf13d2b" title="Informs the congestion control strategy that 1 or more previously sent packets whose status was In-fl...">Congestion_control_strategy::on_drop_timeout()</a>. </td></tr>
    <tr><td class="paramname">packets</td><td>See <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html#af7543a12c99ea8d31374b064fdf13d2b" title="Informs the congestion control strategy that 1 or more previously sent packets whose status was In-fl...">Congestion_control_strategy::on_drop_timeout()</a>. </td></tr>
  </table>
  </dd>
</dl>

<p>Reimplemented from <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html#af7543a12c99ea8d31374b064fdf13d2b">flow::net_flow::Congestion_control_strategy</a>.</p>

<p class="definition">Definition at line <a class="el" href="cong__ctl__classic_8cpp_source.html#l00126">126</a> of file <a class="el" href="cong__ctl__classic_8cpp_source.html">cong_ctl_classic.cpp</a>.</p>

<p class="reference">References <a class="el" href="cong__ctl__classic_8cpp_source.html#l00164">congestion_window_decay()</a>, <a class="el" href="log_8hpp_source.html#l00227">FLOW_LOG_TRACE</a>, <a class="el" href="cong__ctl__classic_8hpp_source.html#l00165">m_classic_data</a>, <a class="el" href="cong__ctl__util_8cpp_source.html#l00293">flow::net_flow::Congestion_control_classic_data::on_drop_timeout()</a>, and <a class="el" href="cong__ctl_8cpp_source.html#l00063">flow::net_flow::Congestion_control_strategy::socket()</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classflow_1_1net__flow_1_1Congestion__control__classic_a59148ce4dafea4063b6992b9670909dc_cgraph.svg" width="1088" height="300"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>

</div>
</div>
<a id="a588baa530b660a3437d3a39d68b16404" name="a588baa530b660a3437d3a39d68b16404"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a588baa530b660a3437d3a39d68b16404">&#9670;&nbsp;</a></span>on_idle_timeout()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void flow::net_flow::Congestion_control_classic::on_idle_timeout </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Implements <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html#a6cecbb76a9e837824c0b820e7cc1b3b7" title="Informs the congestion control strategy that Node considers the connection to be &quot;idle&quot; by virtue of ...">Congestion_control_strategy::on_idle_timeout()</a> API. </p>
<p >Congestion window is set to a low value. Thus a slow start session begins.</p>
<p >Additional <a class="el" href="classflow_1_1net__flow_1_1Peer__socket.html" title="A peer (non-server) socket operating over the Flow network protocol, with optional stream-of-bytes an...">Peer_socket</a> state used: none. </p>

<p>Reimplemented from <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html#a6cecbb76a9e837824c0b820e7cc1b3b7">flow::net_flow::Congestion_control_strategy</a>.</p>

<p class="definition">Definition at line <a class="el" href="cong__ctl__classic_8cpp_source.html#l00176">176</a> of file <a class="el" href="cong__ctl__classic_8cpp_source.html">cong_ctl_classic.cpp</a>.</p>

<p class="reference">References <a class="el" href="cong__ctl__classic_8hpp_source.html#l00165">m_classic_data</a>, and <a class="el" href="cong__ctl__util_8cpp_source.html#l00312">flow::net_flow::Congestion_control_classic_data::on_idle_timeout()</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classflow_1_1net__flow_1_1Congestion__control__classic_a588baa530b660a3437d3a39d68b16404_cgraph.svg" width="1079" height="208"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>

</div>
</div>
<a id="af2340e68dbdbb8d6065ae487b05074be" name="af2340e68dbdbb8d6065ae487b05074be"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af2340e68dbdbb8d6065ae487b05074be">&#9670;&nbsp;</a></span>on_loss_event()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void flow::net_flow::Congestion_control_classic::on_loss_event </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>packets</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Implements <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html#a238eb8f69e309e354d3fbc1c3017f614" title="Informs the congestion control strategy that 1 or more previously sent packets whose status was In-fl...">Congestion_control_strategy::on_loss_event()</a> API. </p>
<p >Congestion window changes to some configurable constant fraction (like half) of its current value, and the next slow start (if any, e.g., on a later Drop Timeout) will end once the congestion window exceeds this value. Thus after this call congestion avoidance mode begins anew.</p>
<p >Additional <a class="el" href="classflow_1_1net__flow_1_1Peer__socket.html" title="A peer (non-server) socket operating over the Flow network protocol, with optional stream-of-bytes an...">Peer_socket</a> state used: <a class="el" href="classflow_1_1net__flow_1_1Peer__socket.html#ae870847f024fca7109c15557bb165480" title="The number of bytes contained in all In-flight packets, used at least for comparison against the cong...">Peer_socket::m_snd_flying_bytes</a> (the # of bytes still In-flight after the loss event).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">bytes</td><td>See <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html#a238eb8f69e309e354d3fbc1c3017f614" title="Informs the congestion control strategy that 1 or more previously sent packets whose status was In-fl...">Congestion_control_strategy::on_loss_event()</a>. </td></tr>
    <tr><td class="paramname">packets</td><td>See <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html#a238eb8f69e309e354d3fbc1c3017f614" title="Informs the congestion control strategy that 1 or more previously sent packets whose status was In-fl...">Congestion_control_strategy::on_loss_event()</a>. </td></tr>
  </table>
  </dd>
</dl>

<p>Reimplemented from <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html#a238eb8f69e309e354d3fbc1c3017f614">flow::net_flow::Congestion_control_strategy</a>.</p>

<p class="definition">Definition at line <a class="el" href="cong__ctl__classic_8cpp_source.html#l00046">46</a> of file <a class="el" href="cong__ctl__classic_8cpp_source.html">cong_ctl_classic.cpp</a>.</p>

<p class="reference">References <a class="el" href="cong__ctl__classic_8cpp_source.html#l00164">congestion_window_decay()</a>, <a class="el" href="log_8hpp_source.html#l00227">FLOW_LOG_TRACE</a>, <a class="el" href="cong__ctl__classic_8hpp_source.html#l00165">m_classic_data</a>, <a class="el" href="cong__ctl__util_8cpp_source.html#l00228">flow::net_flow::Congestion_control_classic_data::on_congestion_event()</a>, and <a class="el" href="cong__ctl_8cpp_source.html#l00063">flow::net_flow::Congestion_control_strategy::socket()</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classflow_1_1net__flow_1_1Congestion__control__classic_af2340e68dbdbb8d6065ae487b05074be_cgraph.svg" width="899" height="232"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a03a5671f57a7a8f7b0cdce200d29bd3b" name="a03a5671f57a7a8f7b0cdce200d29bd3b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a03a5671f57a7a8f7b0cdce200d29bd3b">&#9670;&nbsp;</a></span>m_classic_data</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classflow_1_1net__flow_1_1Congestion__control__classic__data.html">Congestion_control_classic_data</a> flow::net_flow::Congestion_control_classic::m_classic_data</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>The Reno CWND/SSTHRESH-changing engine and CWND/SSTHRESH storage. </p>

<p class="definition">Definition at line <a class="el" href="cong__ctl__classic_8hpp_source.html#l00165">165</a> of file <a class="el" href="cong__ctl__classic_8hpp_source.html">cong_ctl_classic.hpp</a>.</p>

<p class="reference">Referenced by <a class="el" href="cong__ctl__classic_8cpp_source.html#l00033">congestion_window_bytes()</a>, <a class="el" href="cong__ctl__classic_8cpp_source.html#l00038">on_acks()</a>, <a class="el" href="cong__ctl__classic_8cpp_source.html#l00126">on_drop_timeout()</a>, <a class="el" href="cong__ctl__classic_8cpp_source.html#l00176">on_idle_timeout()</a>, and <a class="el" href="cong__ctl__classic_8cpp_source.html#l00046">on_loss_event()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>net_flow/detail/cong_ctl/<a class="el" href="cong__ctl__classic_8hpp_source.html">cong_ctl_classic.hpp</a></li>
<li>net_flow/detail/cong_ctl/<a class="el" href="cong__ctl__classic_8cpp_source.html">cong_ctl_classic.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Mar 28 2025 22:55:35 for Flow by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4
</small></address>
</body>
</html>
